<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" οnsubmit="checkBeforeSubmit()" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" name="row[title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea type="text" class="form-control editor" name="row[content]"id="c-content"></textarea>
            <!--            <input id="c-content" class="form-control" name="row[content]" type="text">-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">是否立即发布</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                <lable for="row[status]-0">
                    <input class="checkbox1" id="row[status]-0" onchange="changeStatus()" name="row[status]" type="checkbox" value="" />
                </lable>
                <!--                <lable for="row[status]-1">-->
                <!--                    <input id="row[status]-1" name="row[status]" type="radio" value="暂不发布"  />-->
                <!--                </lable>-->
                <!--            {foreach name="statusList" item="vo"}-->
                <!--            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label> -->
                <!--            {/foreach}-->
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Level')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-level" class="form-control selectpicker" name="row[level]">
                {foreach name="levelList" item="vo"}
                <option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/javascript">
    function changeStatus() {
        var check = document.querySelector('.checkbox1');
        if (check.checked) {
            check.value = 1;
        } else {
            check.value = '0';
        }
    }
</script>